public class ZhaiZhiJie3
{
    public static void main(String[] args) {
        Dog dog = new Dog("wangcai", "red", 5);
        dog.print();
    }
}

class Dog
{
    private String name;
    private String color;
    private int age;
    public Dog()
    {

    }

    public Dog(String name, String color, int age)
    {
        this.setName(name);
        this.setColor(color);
        this.setAge(age);
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void print()
    {
        System.out.println("name: " + this.name + ", color: " + this.color + ", age: " + this.age);
    }
}
